<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>gluon.sanitizer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="gluon-module.html">Package&nbsp;gluon</a> ::
        Module&nbsp;sanitizer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="gluon.sanitizer-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="gluon.sanitizer-module.html">Module gluon.sanitizer</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Title: Cross-site scripting (XSS) defense</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Submitter: Josh Goldfoot (other recipes)</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Last Updated: 2006/08/05</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Version no: 1.0</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">htmllib</tt> <tt class="py-keyword">import</tt> <tt class="py-name">HTMLParser</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cgi</tt> <tt class="py-keyword">import</tt> <tt class="py-name">escape</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">urlparse</tt> <tt class="py-keyword">import</tt> <tt class="py-name">urlparse</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Method gluon.sql.SQLField.formatter()=gluon.sql.SQLField-class.html#formatter,Method gluon.validators.IS_DATE.formatter()=gluon.validators.IS_DATE-class.html#formatter,Method gluon.validators.IS_DATETIME.formatter()=gluon.validators.IS_DATETIME-class.html#formatter,Method gluon.validators.IS_NULL_OR.formatter()=gluon.validators.IS_NULL_OR-class.html#formatter"><a title="gluon.sql.SQLField.formatter
gluon.validators.IS_DATE.formatter
gluon.validators.IS_DATETIME.formatter
gluon.validators.IS_NULL_OR.formatter" class="py-name" href="#" onclick="return doclink('link-0', 'formatter', 'link-0');">formatter</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">AbstractFormatter</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">htmlentitydefs</tt> <tt class="py-keyword">import</tt> <tt class="py-name">entitydefs</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Method gluon.html.CODE.xml()=gluon.html.CODE-class.html#xml,Method gluon.html.DIV.xml()=gluon.html.DIV-class.html#xml,Method gluon.html.FORM.xml()=gluon.html.FORM-class.html#xml,Method gluon.html.HTML.xml()=gluon.html.HTML-class.html#xml,Method gluon.html.INPUT.xml()=gluon.html.INPUT-class.html#xml,Method gluon.html.P.xml()=gluon.html.P-class.html#xml,Method gluon.html.SCRIPT.xml()=gluon.html.SCRIPT-class.html#xml,Method gluon.html.XML.xml()=gluon.html.XML-class.html#xml,Method gluon.languages.lazyT.xml()=gluon.languages.lazyT-class.html#xml,Method gluon.sql.SQLRows.xml()=gluon.sql.SQLRows-class.html#xml,Method gluon.tools.Recaptcha.xml()=gluon.tools.Recaptcha-class.html#xml"><a title="gluon.html.CODE.xml
gluon.html.DIV.xml
gluon.html.FORM.xml
gluon.html.HTML.xml
gluon.html.INPUT.xml
gluon.html.P.xml
gluon.html.SCRIPT.xml
gluon.html.XML.xml
gluon.languages.lazyT.xml
gluon.sql.SQLRows.xml
gluon.tools.Recaptcha.xml" class="py-name" href="#" onclick="return doclink('link-1', 'xml', 'link-1');">xml</a></tt><tt class="py-op">.</tt><tt class="py-name">sax</tt><tt class="py-op">.</tt><tt class="py-name">saxutils</tt> <tt class="py-keyword">import</tt> <tt class="py-name">quoteattr</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'sanitize'</tt><tt class="py-op">]</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="xssescape"></a><div id="xssescape-def"><a name="L19"></a><tt class="py-lineno"> 19</tt> <a class="py-toggle" href="#" id="xssescape-toggle" onclick="return toggle('xssescape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer-module.html#xssescape">xssescape</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="xssescape-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="xssescape-expanded"><a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt class="py-docstring">"""Gets rid of &lt; and &gt; and &amp; and, for good measure, :"""</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">escape</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt class="py-name">quote</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Function gluon.template.replace()=gluon.template-module.html#replace"><a title="gluon.template.replace" class="py-name" href="#" onclick="return doclink('link-2', 'replace', 'link-2');">replace</a></tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">,</tt> <tt class="py-string">'&amp;#58;'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner"></a><div id="XssCleaner-def"><a name="L25"></a><tt class="py-lineno"> 25</tt> <a class="py-toggle" href="#" id="XssCleaner-toggle" onclick="return toggle('XssCleaner');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html">XssCleaner</a><tt class="py-op">(</tt><tt class="py-base-class">HTMLParser</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="XssCleaner-expanded"><a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.__init__"></a><div id="XssCleaner.__init__-def"><a name="L27"></a><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="XssCleaner.__init__-toggle" onclick="return toggle('XssCleaner.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#__init__">__init__</a><tt class="py-op">(</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">        <tt class="py-param">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-op">[</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">            <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">            <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">            <tt class="py-string">'blockquote'</tt><tt class="py-op">,</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">            <tt class="py-string">'br/'</tt><tt class="py-op">,</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">            <tt class="py-string">'i'</tt><tt class="py-op">,</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">            <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">            <tt class="py-string">'ol'</tt><tt class="py-op">,</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">            <tt class="py-string">'ul'</tt><tt class="py-op">,</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">            <tt class="py-string">'p'</tt><tt class="py-op">,</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">            <tt class="py-string">'cite'</tt><tt class="py-op">,</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">            <tt class="py-string">'code'</tt><tt class="py-op">,</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">            <tt class="py-string">'pre'</tt><tt class="py-op">,</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">            <tt class="py-string">'img/'</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">            <tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-param">allowed_attributes</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'alt'</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">                            <tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'blockquote'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">fmt</tt><tt class="py-op">=</tt><tt class="py-name">AbstractFormatter</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.__init__-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">HTMLParser</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method gluon.cache.Cache.__init__()=gluon.cache.Cache-class.html#__init__,Method gluon.cache.CacheInRam.__init__()=gluon.cache.CacheInRam-class.html#__init__,Method gluon.cache.CacheOnDisk.__init__()=gluon.cache.CacheOnDisk-class.html#__init__,Method gluon.globals.Request.__init__()=gluon.globals.Request-class.html#__init__,Method gluon.globals.Response.__init__()=gluon.globals.Response-class.html#__init__,Method gluon.highlight.Highlighter.__init__()=gluon.highlight.Highlighter-class.html#__init__,Method gluon.html.BEAUTIFY.__init__()=gluon.html.BEAUTIFY-class.html#__init__,Method gluon.html.DIV.__init__()=gluon.html.DIV-class.html#__init__,Method gluon.html.FORM.__init__()=gluon.html.FORM-class.html#__init__,Method gluon.html.XML.__init__()=gluon.html.XML-class.html#__init__,Method gluon.http.HTTP.__init__()=gluon.http.HTTP-class.html#__init__,Method gluon.languages.lazyT.__init__()=gluon.languages.lazyT-class.html#__init__,Method gluon.languages.translator.__init__()=gluon.languages.translator-class.html#__init__,Method gluon.main.HttpServer.__init__()=gluon.main.HttpServer-class.html#__init__,Method gluon.restricted.RestrictedError.__init__()=gluon.restricted.RestrictedError-class.html#__init__,Method gluon.sanitizer.XssCleaner.__init__()=gluon.sanitizer.XssCleaner-class.html#__init__,Method gluon.sql.SQLALL.__init__()=gluon.sql.SQLALL-class.html#__init__,Method gluon.sql.SQLDB.__init__()=gluon.sql.SQLDB-class.html#__init__,Method gluon.sql.SQLField.__init__()=gluon.sql.SQLField-class.html#__init__,Method gluon.sql.SQLJoin.__init__()=gluon.sql.SQLJoin-class.html#__init__,Method gluon.sql.SQLQuery.__init__()=gluon.sql.SQLQuery-class.html#__init__,Method gluon.sql.SQLRows.__init__()=gluon.sql.SQLRows-class.html#__init__,Method gluon.sql.SQLSet.__init__()=gluon.sql.SQLSet-class.html#__init__,Method gluon.sql.SQLTable.__init__()=gluon.sql.SQLTable-class.html#__init__,Method gluon.sql.SQLXorable.__init__()=gluon.sql.SQLXorable-class.html#__init__,Method gluon.sqlhtml.SQLFORM.__init__()=gluon.sqlhtml.SQLFORM-class.html#__init__,Method gluon.sqlhtml.SQLTABLE.__init__()=gluon.sqlhtml.SQLTABLE-class.html#__init__,Method gluon.tools.Auth.__init__()=gluon.tools.Auth-class.html#__init__,Method gluon.tools.Crud.__init__()=gluon.tools.Crud-class.html#__init__,Method gluon.tools.Mail.__init__()=gluon.tools.Mail-class.html#__init__,Method gluon.tools.Recaptcha.__init__()=gluon.tools.Recaptcha-class.html#__init__,Method gluon.validators.CLEANUP.__init__()=gluon.validators.CLEANUP-class.html#__init__,Method gluon.validators.CRYPT.__init__()=gluon.validators.CRYPT-class.html#__init__,Method gluon.validators.IS_ALPHANUMERIC.__init__()=gluon.validators.IS_ALPHANUMERIC-class.html#__init__,Method gluon.validators.IS_DATE.__init__()=gluon.validators.IS_DATE-class.html#__init__,Method gluon.validators.IS_DATETIME.__init__()=gluon.validators.IS_DATETIME-class.html#__init__,Method gluon.validators.IS_EMAIL.__init__()=gluon.validators.IS_EMAIL-class.html#__init__,Method gluon.validators.IS_EXPR.__init__()=gluon.validators.IS_EXPR-class.html#__init__,Method gluon.validators.IS_FLOAT_IN_RANGE.__init__()=gluon.validators.IS_FLOAT_IN_RANGE-class.html#__init__,Method gluon.validators.IS_GENERIC_URL.__init__()=gluon.validators.IS_GENERIC_URL-class.html#__init__,Method gluon.validators.IS_HTTP_URL.__init__()=gluon.validators.IS_HTTP_URL-class.html#__init__,Method gluon.validators.IS_INT_IN_RANGE.__init__()=gluon.validators.IS_INT_IN_RANGE-class.html#__init__,Method gluon.validators.IS_IN_DB.__init__()=gluon.validators.IS_IN_DB-class.html#__init__,Method gluon.validators.IS_IN_SET.__init__()=gluon.validators.IS_IN_SET-class.html#__init__,Method gluon.validators.IS_IN_SUBSET.__init__()=gluon.validators.IS_IN_SUBSET-class.html#__init__,Method gluon.validators.IS_LENGTH.__init__()=gluon.validators.IS_LENGTH-class.html#__init__,Method gluon.validators.IS_LIST_OF.__init__()=gluon.validators.IS_LIST_OF-class.html#__init__,Method gluon.validators.IS_MATCH.__init__()=gluon.validators.IS_MATCH-class.html#__init__,Method gluon.validators.IS_NOT_EMPTY.__init__()=gluon.validators.IS_NOT_EMPTY-class.html#__init__,Method gluon.validators.IS_NOT_IN_DB.__init__()=gluon.validators.IS_NOT_IN_DB-class.html#__init__,Method gluon.validators.IS_NULL_OR.__init__()=gluon.validators.IS_NULL_OR-class.html#__init__,Method gluon.validators.IS_TIME.__init__()=gluon.validators.IS_TIME-class.html#__init__,Method gluon.validators.IS_URL.__init__()=gluon.validators.IS_URL-class.html#__init__,Method gluon.widget.IO.__init__()=gluon.widget.IO-class.html#__init__,Method gluon.widget.web2pyDialog.__init__()=gluon.widget.web2pyDialog-class.html#__init__,Method gluon.winservice.Service.__init__()=gluon.winservice.Service-class.html#__init__,Method gluon.wsgiserver.CherryPyWSGIServer.__init__()=gluon.wsgiserver.CherryPyWSGIServer-class.html#__init__,Method gluon.wsgiserver.HTTPConnection.__init__()=gluon.wsgiserver.HTTPConnection-class.html#__init__,Method gluon.wsgiserver.HTTPRequest.__init__()=gluon.wsgiserver.HTTPRequest-class.html#__init__,Method gluon.wsgiserver.SSLConnection.__init__()=gluon.wsgiserver.SSLConnection-class.html#__init__,Method gluon.wsgiserver.SizeCheckWrapper.__init__()=gluon.wsgiserver.SizeCheckWrapper-class.html#__init__,Method gluon.wsgiserver.ThreadPool.__init__()=gluon.wsgiserver.ThreadPool-class.html#__init__,Method gluon.wsgiserver.WSGIPathInfoDispatcher.__init__()=gluon.wsgiserver.WSGIPathInfoDispatcher-class.html#__init__,Method gluon.wsgiserver.WorkerThread.__init__()=gluon.wsgiserver.WorkerThread-class.html#__init__"><a title="gluon.cache.Cache.__init__
gluon.cache.CacheInRam.__init__
gluon.cache.CacheOnDisk.__init__
gluon.globals.Request.__init__
gluon.globals.Response.__init__
gluon.highlight.Highlighter.__init__
gluon.html.BEAUTIFY.__init__
gluon.html.DIV.__init__
gluon.html.FORM.__init__
gluon.html.XML.__init__
gluon.http.HTTP.__init__
gluon.languages.lazyT.__init__
gluon.languages.translator.__init__
gluon.main.HttpServer.__init__
gluon.restricted.RestrictedError.__init__
gluon.sanitizer.XssCleaner.__init__
gluon.sql.SQLALL.__init__
gluon.sql.SQLDB.__init__
gluon.sql.SQLField.__init__
gluon.sql.SQLJoin.__init__
gluon.sql.SQLQuery.__init__
gluon.sql.SQLRows.__init__
gluon.sql.SQLSet.__init__
gluon.sql.SQLTable.__init__
gluon.sql.SQLXorable.__init__
gluon.sqlhtml.SQLFORM.__init__
gluon.sqlhtml.SQLTABLE.__init__
gluon.tools.Auth.__init__
gluon.tools.Crud.__init__
gluon.tools.Mail.__init__
gluon.tools.Recaptcha.__init__
gluon.validators.CLEANUP.__init__
gluon.validators.CRYPT.__init__
gluon.validators.IS_ALPHANUMERIC.__init__
gluon.validators.IS_DATE.__init__
gluon.validators.IS_DATETIME.__init__
gluon.validators.IS_EMAIL.__init__
gluon.validators.IS_EXPR.__init__
gluon.validators.IS_FLOAT_IN_RANGE.__init__
gluon.validators.IS_GENERIC_URL.__init__
gluon.validators.IS_HTTP_URL.__init__
gluon.validators.IS_INT_IN_RANGE.__init__
gluon.validators.IS_IN_DB.__init__
gluon.validators.IS_IN_SET.__init__
gluon.validators.IS_IN_SUBSET.__init__
gluon.validators.IS_LENGTH.__init__
gluon.validators.IS_LIST_OF.__init__
gluon.validators.IS_MATCH.__init__
gluon.validators.IS_NOT_EMPTY.__init__
gluon.validators.IS_NOT_IN_DB.__init__
gluon.validators.IS_NULL_OR.__init__
gluon.validators.IS_TIME.__init__
gluon.validators.IS_URL.__init__
gluon.widget.IO.__init__
gluon.widget.web2pyDialog.__init__
gluon.winservice.Service.__init__
gluon.wsgiserver.CherryPyWSGIServer.__init__
gluon.wsgiserver.HTTPConnection.__init__
gluon.wsgiserver.HTTPRequest.__init__
gluon.wsgiserver.SSLConnection.__init__
gluon.wsgiserver.SizeCheckWrapper.__init__
gluon.wsgiserver.ThreadPool.__init__
gluon.wsgiserver.WSGIPathInfoDispatcher.__init__
gluon.wsgiserver.WorkerThread.__init__" class="py-name" href="#" onclick="return doclink('link-3', '__init__', 'link-3');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">fmt</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">i</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">permitted_tags</tt> <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                               <tt class="py-op">]</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">permitted_tags</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                                  <tt class="py-keyword">if</tt> <tt class="py-name">i</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/'</tt><tt class="py-op">]</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt> <tt class="py-op">+=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">allowed_attributes</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-comment"># The only schemes allowed in URLs (for href and src attributes).</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># Adding "javascript" or "vbscript" to this list would not be smart.</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'http'</tt><tt class="py-op">,</tt> <tt class="py-string">'https'</tt><tt class="py-op">,</tt> <tt class="py-string">'ftp'</tt><tt class="py-op">]</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_data"></a><div id="XssCleaner.handle_data-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_data-toggle" onclick="return toggle('XssCleaner.handle_data');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_data">handle_data</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_data-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_data-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">data</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-4" class="py-name" targets="Function gluon.sanitizer.xssescape()=gluon.sanitizer-module.html#xssescape"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-4', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_charref"></a><div id="XssCleaner.handle_charref-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_charref-toggle" onclick="return toggle('XssCleaner.handle_charref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_charref">handle_charref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ref</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_charref-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_charref-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ref</tt><tt class="py-op">)</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">7</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ref</tt><tt class="py-op">.</tt><tt class="py-name">isdigit</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&amp;#%s;'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-5" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-5', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&amp;#%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt><tt class="py-op">)</tt> </tt>
</div><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_entityref"></a><div id="XssCleaner.handle_entityref-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_entityref-toggle" onclick="return toggle('XssCleaner.handle_entityref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_entityref">handle_entityref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ref</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_entityref-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_entityref-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ref</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entitydefs</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&amp;%s;'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-6" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-6', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&amp;%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ref</tt><tt class="py-op">)</tt> </tt>
</div><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_comment"></a><div id="XssCleaner.handle_comment-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_comment-toggle" onclick="return toggle('XssCleaner.handle_comment');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_comment">handle_comment</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">comment</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_comment-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_comment-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">comment</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-7" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-7', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;!--%s--&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">comment</tt><tt class="py-op">)</tt> </tt>
</div><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_starttag"></a><div id="XssCleaner.handle_starttag-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_starttag-toggle" onclick="return toggle('XssCleaner.handle_starttag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_starttag">handle_starttag</a><tt class="py-op">(</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-param">self</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-param">tag</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-param">method</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-param">attrs</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_starttag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_starttag-expanded"><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-8" class="py-name" targets="Variable gluon.html.A.tag=gluon.html.A-class.html#tag,Variable gluon.html.B.tag=gluon.html.B-class.html#tag,Variable gluon.html.BEAUTIFY.tag=gluon.html.BEAUTIFY-class.html#tag,Variable gluon.html.BODY.tag=gluon.html.BODY-class.html#tag,Variable gluon.html.BR.tag=gluon.html.BR-class.html#tag,Variable gluon.html.CENTER.tag=gluon.html.CENTER-class.html#tag,Variable gluon.html.DIV.tag=gluon.html.DIV-class.html#tag,Variable gluon.html.EM.tag=gluon.html.EM-class.html#tag,Variable gluon.html.EMBED.tag=gluon.html.EMBED-class.html#tag,Variable gluon.html.FIELDSET.tag=gluon.html.FIELDSET-class.html#tag,Variable gluon.html.FORM.tag=gluon.html.FORM-class.html#tag,Variable gluon.html.H1.tag=gluon.html.H1-class.html#tag,Variable gluon.html.H2.tag=gluon.html.H2-class.html#tag,Variable gluon.html.H3.tag=gluon.html.H3-class.html#tag,Variable gluon.html.H4.tag=gluon.html.H4-class.html#tag,Variable gluon.html.H5.tag=gluon.html.H5-class.html#tag,Variable gluon.html.H6.tag=gluon.html.H6-class.html#tag,Variable gluon.html.HEAD.tag=gluon.html.HEAD-class.html#tag,Variable gluon.html.HR.tag=gluon.html.HR-class.html#tag,Variable gluon.html.HTML.tag=gluon.html.HTML-class.html#tag,Variable gluon.html.IFRAME.tag=gluon.html.IFRAME-class.html#tag,Variable gluon.html.IMG.tag=gluon.html.IMG-class.html#tag,Variable gluon.html.INPUT.tag=gluon.html.INPUT-class.html#tag,Variable gluon.html.LABEL.tag=gluon.html.LABEL-class.html#tag,Variable gluon.html.LEGEND.tag=gluon.html.LEGEND-class.html#tag,Variable gluon.html.LI.tag=gluon.html.LI-class.html#tag,Variable gluon.html.LINK.tag=gluon.html.LINK-class.html#tag,Variable gluon.html.META.tag=gluon.html.META-class.html#tag,Variable gluon.html.OBJECT.tag=gluon.html.OBJECT-class.html#tag,Variable gluon.html.OL.tag=gluon.html.OL-class.html#tag,Variable gluon.html.OPTION.tag=gluon.html.OPTION-class.html#tag,Variable gluon.html.P.tag=gluon.html.P-class.html#tag,Variable gluon.html.PRE.tag=gluon.html.PRE-class.html#tag,Variable gluon.html.SCRIPT.tag=gluon.html.SCRIPT-class.html#tag,Variable gluon.html.SELECT.tag=gluon.html.SELECT-class.html#tag,Variable gluon.html.SPAN.tag=gluon.html.SPAN-class.html#tag,Variable gluon.html.STYLE.tag=gluon.html.STYLE-class.html#tag,Variable gluon.html.TABLE.tag=gluon.html.TABLE-class.html#tag,Variable gluon.html.TBODY.tag=gluon.html.TBODY-class.html#tag,Variable gluon.html.TD.tag=gluon.html.TD-class.html#tag,Variable gluon.html.TEXTAREA.tag=gluon.html.TEXTAREA-class.html#tag,Variable gluon.html.TFOOT.tag=gluon.html.TFOOT-class.html#tag,Variable gluon.html.TH.tag=gluon.html.TH-class.html#tag,Variable gluon.html.THEAD.tag=gluon.html.THEAD-class.html#tag,Variable gluon.html.TITLE.tag=gluon.html.TITLE-class.html#tag,Variable gluon.html.TR.tag=gluon.html.TR-class.html#tag,Variable gluon.html.TT.tag=gluon.html.TT-class.html#tag,Variable gluon.html.UL.tag=gluon.html.UL-class.html#tag"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-8', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-9" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-9', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;%s&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-10" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-10', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-name">bt</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;'</tt> <tt class="py-op">+</tt> <tt id="link-11" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-11', 'tag', 'link-8');">tag</a></tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-12', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                <tt class="py-name">attrs</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes_here</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt> <tt class="py-keyword">for</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">[</tt><tt id="link-13" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-13', 'tag', 'link-8');">tag</a></tt><tt class="py-op">]</tt> <tt class="py-keyword">if</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attrs</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                         <tt class="py-keyword">and</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes_here</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'background'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method gluon.sanitizer.XssCleaner.url_is_acceptable()=gluon.sanitizer.XssCleaner-class.html#url_is_acceptable"><a title="gluon.sanitizer.XssCleaner.url_is_acceptable" class="py-name" href="#" onclick="return doclink('link-14', 'url_is_acceptable', 'link-14');">url_is_acceptable</a></tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">                            <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s="%s"'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">attribute</tt><tt class="py-op">,</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                                    <tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                        <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s=%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-15" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-15', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">attribute</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                                <tt class="py-name">quoteattr</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">bt</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;a'</tt> <tt class="py-keyword">or</tt> <tt class="py-name">bt</tt> <tt class="py-op">==</tt> <tt class="py-string">'&lt;img'</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-16" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-16', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">'/'</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">            <tt class="py-name">bt</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&gt;'</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-name">bt</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method gluon.html.DIV.insert()=gluon.html.DIV-class.html#insert,Method gluon.sql.SQLTable.insert()=gluon.sql.SQLTable-class.html#insert"><a title="gluon.html.DIV.insert
gluon.sql.SQLTable.insert" class="py-name" href="#" onclick="return doclink('link-17', 'insert', 'link-17');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-18', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.handle_endtag"></a><div id="XssCleaner.handle_endtag-def"><a name="L115"></a><tt class="py-lineno">115</tt> <a class="py-toggle" href="#" id="XssCleaner.handle_endtag-toggle" onclick="return toggle('XssCleaner.handle_endtag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#handle_endtag">handle_endtag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attrs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.handle_endtag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.handle_endtag-expanded"><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">bracketed</tt> <tt class="py-op">=</tt> <tt class="py-string">'&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt id="link-19" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-19', 'tag', 'link-8');">tag</a></tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-20" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-20', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt id="link-21" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-21', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">bracketed</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-22" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-22', 'tag', 'link-8');">tag</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-name">bracketed</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt id="link-23" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-23', 'tag', 'link-8');">tag</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.unknown_starttag"></a><div id="XssCleaner.unknown_starttag-def"><a name="L123"></a><tt class="py-lineno">123</tt> <a class="py-toggle" href="#" id="XssCleaner.unknown_starttag-toggle" onclick="return toggle('XssCleaner.unknown_starttag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#unknown_starttag">unknown_starttag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.unknown_starttag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.unknown_starttag-expanded"><a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Method gluon.sanitizer.XssCleaner.handle_starttag()=gluon.sanitizer.XssCleaner-class.html#handle_starttag"><a title="gluon.sanitizer.XssCleaner.handle_starttag" class="py-name" href="#" onclick="return doclink('link-24', 'handle_starttag', 'link-24');">handle_starttag</a></tt><tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-25', 'tag', 'link-8');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
</div><a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.unknown_endtag"></a><div id="XssCleaner.unknown_endtag-def"><a name="L126"></a><tt class="py-lineno">126</tt> <a class="py-toggle" href="#" id="XssCleaner.unknown_endtag-toggle" onclick="return toggle('XssCleaner.unknown_endtag');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#unknown_endtag">unknown_endtag</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.unknown_endtag-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.unknown_endtag-expanded"><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method gluon.sanitizer.XssCleaner.handle_endtag()=gluon.sanitizer.XssCleaner-class.html#handle_endtag"><a title="gluon.sanitizer.XssCleaner.handle_endtag" class="py-name" href="#" onclick="return doclink('link-26', 'handle_endtag', 'link-26');">handle_endtag</a></tt><tt class="py-op">(</tt><tt id="link-27" class="py-name"><a title="gluon.html.A.tag
gluon.html.B.tag
gluon.html.BEAUTIFY.tag
gluon.html.BODY.tag
gluon.html.BR.tag
gluon.html.CENTER.tag
gluon.html.DIV.tag
gluon.html.EM.tag
gluon.html.EMBED.tag
gluon.html.FIELDSET.tag
gluon.html.FORM.tag
gluon.html.H1.tag
gluon.html.H2.tag
gluon.html.H3.tag
gluon.html.H4.tag
gluon.html.H5.tag
gluon.html.H6.tag
gluon.html.HEAD.tag
gluon.html.HR.tag
gluon.html.HTML.tag
gluon.html.IFRAME.tag
gluon.html.IMG.tag
gluon.html.INPUT.tag
gluon.html.LABEL.tag
gluon.html.LEGEND.tag
gluon.html.LI.tag
gluon.html.LINK.tag
gluon.html.META.tag
gluon.html.OBJECT.tag
gluon.html.OL.tag
gluon.html.OPTION.tag
gluon.html.P.tag
gluon.html.PRE.tag
gluon.html.SCRIPT.tag
gluon.html.SELECT.tag
gluon.html.SPAN.tag
gluon.html.STYLE.tag
gluon.html.TABLE.tag
gluon.html.TBODY.tag
gluon.html.TD.tag
gluon.html.TEXTAREA.tag
gluon.html.TFOOT.tag
gluon.html.TH.tag
gluon.html.THEAD.tag
gluon.html.TITLE.tag
gluon.html.TR.tag
gluon.html.TT.tag
gluon.html.UL.tag" class="py-name" href="#" onclick="return doclink('link-27', 'tag', 'link-8');">tag</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
</div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.url_is_acceptable"></a><div id="XssCleaner.url_is_acceptable-def"><a name="L129"></a><tt class="py-lineno">129</tt> <a class="py-toggle" href="#" id="XssCleaner.url_is_acceptable-toggle" onclick="return toggle('XssCleaner.url_is_acceptable');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#url_is_acceptable">url_is_acceptable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.url_is_acceptable-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.url_is_acceptable-expanded"><a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">        Requires all URLs to be \"absolute.\"</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-name">parsed</tt> <tt class="py-op">=</tt> <tt class="py-name">urlparse</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_schemes</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'.'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">parsed</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
</div><a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.strip"></a><div id="XssCleaner.strip-def"><a name="L137"></a><tt class="py-lineno">137</tt> <a class="py-toggle" href="#" id="XssCleaner.strip-toggle" onclick="return toggle('XssCleaner.strip');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#strip">strip</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">rawstring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.strip-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.strip-expanded"><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">        Returns the argument stripped of potentially harmful </tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">        HTML or Javascript code</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">feed</tt><tt class="py-op">(</tt><tt class="py-name">rawstring</tt><tt class="py-op">)</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">endtag</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">open_tags</tt><tt class="py-op">:</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">endtag</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">requires_no_close</tt><tt class="py-op">:</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&lt;/%s&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-name">endtag</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">result</tt> </tt>
</div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
<a name="XssCleaner.xtags"></a><div id="XssCleaner.xtags-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="XssCleaner.xtags-toggle" onclick="return toggle('XssCleaner.xtags');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer.XssCleaner-class.html#xtags">xtags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="XssCleaner.xtags-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="XssCleaner.xtags-expanded"><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a printable string informing the user which tags are allowed</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-name">tg</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sorted</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">            <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&lt;'</tt> <tt class="py-op">+</tt> <tt class="py-name">x</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">:</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">y</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">                    <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">' %s=""'</tt> <tt class="py-op">%</tt> <tt class="py-name">y</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">            <tt class="py-name">tg</tt> <tt class="py-op">+=</tt> <tt class="py-string">'&gt; '</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-28" class="py-name"><a title="gluon.sanitizer.xssescape" class="py-name" href="#" onclick="return doclink('link-28', 'xssescape', 'link-4');">xssescape</a></tt><tt class="py-op">(</tt><tt class="py-name">tg</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method gluon.sanitizer.XssCleaner.strip()=gluon.sanitizer.XssCleaner-class.html#strip"><a title="gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-29', 'strip', 'link-29');">strip</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"> </tt>
<a name="sanitize"></a><div id="sanitize-def"><a name="L165"></a><tt class="py-lineno">165</tt> <a class="py-toggle" href="#" id="sanitize-toggle" onclick="return toggle('sanitize');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="gluon.sanitizer-module.html#sanitize">sanitize</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt> <tt class="py-param">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-op">[</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">    <tt class="py-string">'a'</tt><tt class="py-op">,</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">    <tt class="py-string">'b'</tt><tt class="py-op">,</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">    <tt class="py-string">'blockquote'</tt><tt class="py-op">,</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">    <tt class="py-string">'br/'</tt><tt class="py-op">,</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">    <tt class="py-string">'i'</tt><tt class="py-op">,</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">    <tt class="py-string">'li'</tt><tt class="py-op">,</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">    <tt class="py-string">'ol'</tt><tt class="py-op">,</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">    <tt class="py-string">'ul'</tt><tt class="py-op">,</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">    <tt class="py-string">'p'</tt><tt class="py-op">,</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">    <tt class="py-string">'cite'</tt><tt class="py-op">,</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">    <tt class="py-string">'code'</tt><tt class="py-op">,</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">    <tt class="py-string">'pre'</tt><tt class="py-op">,</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">    <tt class="py-string">'img/'</tt><tt class="py-op">,</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">    <tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">allowed_attributes</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'a'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'href'</tt><tt class="py-op">,</tt> <tt class="py-string">'title'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'img'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'src'</tt><tt class="py-op">,</tt> <tt class="py-string">'alt'</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">                           <tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'blockquote'</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="sanitize-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="sanitize-expanded"><a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-30" class="py-name" targets="Class gluon.sanitizer.XssCleaner=gluon.sanitizer.XssCleaner-class.html"><a title="gluon.sanitizer.XssCleaner" class="py-name" href="#" onclick="return doclink('link-30', 'XssCleaner', 'link-30');">XssCleaner</a></tt><tt class="py-op">(</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">=</tt><tt class="py-name">permitted_tags</tt><tt class="py-op">,</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                      <tt class="py-name">allowed_attributes</tt><tt class="py-op">=</tt><tt class="py-name">allowed_attributes</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="gluon.sanitizer.XssCleaner.strip" class="py-name" href="#" onclick="return doclink('link-31', 'strip', 'link-29');">strip</a></tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
</div><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="gluon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.web2py.com">web2py Web Framework</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Feb 17 09:15:33 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
